import axios from 'axios'

const service = axios.create({
  baseURL: 'http://localhost:5000',
  timeout: 6000,
  withCredentials:true
})

// 添加请求拦截器，在请求头中加token
// axios.interceptors.request.use(
//     config => {
//       if (localStorage.getItem('token')) {
//         config.headers.Authorization = localStorage.getItem('token');
//       }
//       return config;
//     },
//     error => {
//       return Promise.reject(error);
//     });

export default service
